package com.hellpro.lolbox.moment.model;

import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.handmark.pulltorefresh.library.PullToRefreshListView;
import com.hellpro.lolbox.moment.bean.MomentContentBean;

import java.util.List;

/**
 * 类描述:
 * 创建人:阿犇
 * 创建时间:2016/10/22
 * 备注:
 */

public class MomentContentBiz implements ILoadContentInfo {


    private MomentContentLvAdapter adapter = new MomentContentLvAdapter();

    @Override
    public void setMomentContentLvAdapter(List<MomentContentBean.DataBean> mList, PullToRefreshListView mLv, int flag) {

        mLv.setMode(PullToRefreshBase.Mode.PULL_FROM_END);
        if (flag == 0) {
            mLv.setAdapter(adapter);
            adapter.setData(mList);
        } else {
            adapter.setData(mList);
            adapter.notifyDataSetChanged();
        }
       /* adapter.setData(mList);
        mLv.setAdapter(adapter);*/
    }
}
